import 'package:FiduMart/generated/json/base/json_convert_content.dart';
import 'package:FiduMart/core/network/model/image_path_entity.dart';

ImagePathEntity $ImagePathEntityFromJson(Map<String, dynamic> json) {
  final ImagePathEntity imagePathEntity = ImagePathEntity();
  final String? path = jsonConvert.convert<String>(json['path']);
  if (path != null) {
    imagePathEntity.path = path;
  }
  final String? url = jsonConvert.convert<String>(json['url']);
  if (url != null) {
    imagePathEntity.url = url;
  }
  return imagePathEntity;
}

Map<String, dynamic> $ImagePathEntityToJson(ImagePathEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['path'] = entity.path;
  data['url'] = entity.url;
  return data;
}

extension ImagePathEntityExt on ImagePathEntity {
  ImagePathEntity copyWith({
    String? path,
    String? url,
  }) {
    return ImagePathEntity()
      ..path = path ?? this.path
      ..url = url ?? this.url;
  }
}